package ooday02.practise;

public class Student extends Person{
    private int stuId;
    private double degree;
    public Student(){

    }
    public Student(String name,int age,String address,int stuId,double degree){
        super(name,age,address);
        this.stuId=stuId;
        this.degree=degree;
    }

    @Override
    public void eat() {
        System.out.println(super.getName()+"吃饭");
    }

    @Override
    public void sleep() {
        System.out.println(getName()+"睡觉");
    }

    @Override
    public void play() {
        System.out.println(getName()+"玩耍");
    }

    public void study(){
        System.out.println(getName()+"学习,分数为"+degree);
    }

    public void setStuId(int stuId){
        this.stuId=stuId;
    }

    public int getStuId(){
        return stuId;
    }
    public void setDegree(double degree){
        this.degree=degree;
    }
    public double getDegree(){
        return degree;
    }
}
